//package com.corn.kafkastream.serdes;
//
//import com.corn.kafkastream.entity.User;
//import com.fasterxml.jackson.databind.DeserializationFeature;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import org.apache.kafka.common.serialization.Deserializer;
//
//import java.io.IOException;
//
///**
// * @author : Jim Wu
// * @version 1.0
// * @function :
// * @since : 2022/9/20 10:56
// */
//
//public class UserDeSerializer implements Deserializer<User> {
//    private static final ObjectMapper OBJECT_MAPPER;
//
//    static {
//        OBJECT_MAPPER = new ObjectMapper();
//        OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//    }
//
//    @Override
//    public User deserialize(String topic, byte[] data) {
//        try {
//            return OBJECT_MAPPER.readValue(data, User.class);
//        } catch (IOException e) {
//            e.printStackTrace();
//            return null;
//        }
//    }
//}
